
$(function () {
    initEvent();
});

function initEvent() {
    $("#bindParQrcode").off('click').on('click', function () {
        bind_Partner_Qr_Code();
    });
}

function bind_Partner_Qr_Code() {
    var partner_no = $('#partner_no').val();//机构号
    var contact_phone = $('#contact_phone').val();//机构联系人手机号
    var qr_code = $('#qr_code').val();//绑定的二维码
    var token_id = $('#token_id').val();
    if ('' == $.trim(partner_no)) {
        falert('请输入机构号');
        return false;
    }

    if ('' == $.trim(contact_phone)) {
        falert('请输入机构联系人手机号');
        return false;
    }

    var datas = {
        interface:'Cooperation@bindPartnerQrCode',
        partner_no: partner_no,
        contact_phone: contact_phone,
        qr_code: qr_code,
        token_id: token_id
    };
    common.ajax({
        data: datas,
        success: function (data) {
            if (data.status == '2000') {
                falert('绑定成功',data.result.jumpUrl);
            } else if (data.status == '5000') {
                falert(data.msg);
            }
        }
    });

}


